﻿Imports TyranntClientCom.UserServiceReference

Public Class Form1

    Private WithEvents _client As New TyranntClientCom.UserServiceReference.UserServiceClient


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub loginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loginButton.Click
        Dim login As New LoginType
        login.Username = usernameTextBox.Text
        login.Password = passwordTextBox.Text
        _client.LoginAsync(login)
    End Sub

    Private Sub _client_LoginCompleted(ByVal sender As Object, ByVal e As TyranntClientCom.UserServiceReference.LoginCompletedEventArgs) Handles _client.LoginCompleted
        resultTextBox.Text = e.Result.TokenGUID.ToString + vbCrLf + vbCrLf + e.Result.UserAlias

    End Sub
End Class
